package com.linkage.seapeak.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.linkage.jz.bankruptcy.R;
import com.linkage.jz.bankruptcy.activity.Project.ZQUser.CreateZQBCApplyActivity;
import com.linkage.jz.bankruptcy.bean.ProCrDecReviewInfo;
import com.linkage.jz.bankruptcy.bean.ZQBaseProjectCrDecInfo;
import com.linkage.jz.bankruptcy.bean.ZQBaseTagInfo;
import com.linkage.jz.bankruptcy.bean.ZQUserDetailBaseInfo;
import com.linkage.jz.bankruptcy.net.BaseSubscriber;
import com.linkage.jz.bankruptcy.net.Network;
import com.linkage.jz.bankruptcy.utils.LogUtil;
import com.linkage.jz.bankruptcy.utils.ScreenUtils;
import com.linkage.seapeak.activity.project.CreditorReviewDetailActivity;
import com.linkage.seapeak.activity.project.DissentAddActivity;
import com.linkage.seapeak.activity.project.EditCreditorReviewInfoActivity;
import com.linkage.seapeak.base.CommonBaseFragment;
import com.linkage.seapeak.utils.CommonUtils;

import org.greenrobot.eventbus.EventBus;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import butterknife.BindView;
import butterknife.OnClick;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

import static com.linkage.jz.bankruptcy.net.ToastUtil.showShort;

/**
 * 审查意见 信息页面
 */
public class ExamineInfoFragment extends CommonBaseFragment {

    private  Boolean showflag;

    @BindView(R.id.rootView)
    ScrollView mScrollView;

    @BindView(R.id.tv_examine_status)
    TextView tvExamineStatus;
    @BindView(R.id.tv_send_examine)
    TextView tvSendExamine;
    @BindView(R.id.tv_creditor_tip)
    TextView tvCreditorTip;
    @BindView(R.id.line0)
    View     line0;
    @BindView(R.id.tv_edit_creditor_name)
    TextView tvEditCreditorName;

    @BindView(R.id.ly_normal_declared_amount)
    RelativeLayout lyNormalDeclaredAmount;
    @BindView(R.id.tv_edit_principal)
    TextView       tvEditPrincipal;
    @BindView(R.id.tv_edit_interest)
    TextView       tvEditInterest;
    @BindView(R.id.tv_edit_other)
    TextView       tvEditOther;
    @BindView(R.id.tv_edit_total_amount)
    TextView       tvEditTotalAmount;
    @BindView(R.id.tv_edit_instructions)
    TextView       tvEditInstructions;
    @BindView(R.id.tv_edit_priority_obligee_amount)
    TextView       tvEditPriorityObligeeAmount;
    @BindView(R.id.tv_edit_other_obligee_amount)
    TextView       tvEditOtherObligeeAmount;
    @BindView(R.id.tv_edit_obligee_instructions)
    TextView       tvEditObligeeInstructions;
    @BindView(R.id.tv_edit_confirm_amount)
    TextView       tvEditConfirmAmount;
    @BindView(R.id.tv_edit_normal_amount)
    TextView       tvEditNormalAmount;
    @BindView(R.id.tv_edit_creditor_amount)
    TextView       tvEditCreditorAmount;
    @BindView(R.id.tv_edit_other_creditor_amount)
    TextView       tvEditOtherCreditorAmount;
    @BindView(R.id.tv_edit_no_given_amount)
    TextView       tvEditNoGivenAmount;
    @BindView(R.id.tv_edit_pending_amount)
    TextView       tvEditPendingAmount;
    @BindView(R.id.tv_edit_review_result)
    TextView       tvEditReviewResult;
    @BindView(R.id.tv_edit_supplement_info)
    TextView       tvEditSupplementInfo;
    @BindView(R.id.tv_edit_tip_info)
    TextView       tvEditTipInfo;
    @BindView(R.id.tv_title6)
    TextView       tvTitle6;
    @BindView(R.id.tv_notictv)
    TextView       tvNotictv;
    @BindView(R.id.view_line6)
    View       viewLine6;

    @BindView(R.id.line5)
    View       viewLine5;



    //
    @BindView(R.id.ly_tax_declared_amount)
    RelativeLayout lyTaxDeclaredAmount;
    @BindView(R.id.tv_edit_normal_tax)
    TextView       tvEditNormalTax;
    @BindView(R.id.tv_edit_overdue_fine)
    TextView       tvEditOverdueFine;


    @BindView(R.id.ly_no_tax_declare)
    RelativeLayout lyNoTaxDeclare;

    @BindView(R.id.tv_edit_result_normal_tax)
    TextView tvEditResultNormalTax;
    @BindView(R.id.tv_edit_result_overdue_fine)
    TextView tvEditResultOverdueFine;
    @BindView(R.id.tv_edit_result_other)
    TextView tvEditResultOther;

    @BindView(R.id.ly_tax_review_result)
    RelativeLayout lyTaxReviewResult;
    @BindView(R.id.ly_normal_review_result)
    RelativeLayout lyNormalReviewResult;

    @BindView(R.id.ly_option)
    LinearLayout lyOption;

    @BindView(R.id.btn_objection)
    TextView btnObjection;



    private String mProjectId;
    private String mReviewId;
    private String mCreditorRightsId;
    private String mCreditorId;

    private   ZQBaseProjectCrDecInfo projectCrDec;
    private String mReEditData;

    private boolean isManageType;//true:管理人 false：债权人
    private boolean isReplenishOrReviewPage = false;//true:补充 或 重新审查 类型
    private boolean isTaxMode               = true;//true：税务机关债券；false：一般债券人
    private int     mReviewStatus;//reviewStatus =1:审查意见已发送 - 顶部显示『重新审查（manager/creditor/rights/reReviewDo ）』;reviewStatus =3:审查意见未发送 - 顶部显示『发送债权人』

    private Boolean mShowBt;//true显示 false不显示


    public ScrollView getScrollView() {
        return mScrollView;
    }

    public static ExamineInfoFragment getInstance( boolean isManageType, boolean isTaxMode, boolean isReplenishOrReviewPage, String mProjectId, String mReviewId, String mCreditorRightsId, int reviewStatus,boolean showBt ) {
        ExamineInfoFragment fragment = new ExamineInfoFragment();
        fragment.isManageType = isManageType;
        fragment.isTaxMode = isTaxMode;
        fragment.isReplenishOrReviewPage = isReplenishOrReviewPage;
        fragment.mProjectId = mProjectId;
        fragment.mReviewId = mReviewId;
        fragment.mCreditorRightsId = mCreditorRightsId;
        fragment.mReviewStatus = reviewStatus;
        fragment.mShowBt = showBt;
        return fragment;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_examine_info_status;
    }

    @Override
    protected void initVariable( Bundle savedInstanceState ) {
    }

    @Override
    public void initViews() {
        super.initViews();
        showflag = false;
        if (isTaxMode) {
            lyTaxDeclaredAmount.setVisibility(View.VISIBLE);
            lyNormalDeclaredAmount.setVisibility(View.GONE);

            lyNoTaxDeclare.setVisibility(View.GONE);
            lyNormalReviewResult.setVisibility(View.GONE);

            lyTaxReviewResult.setVisibility(View.VISIBLE);
        }
        if (isManageType) {
            if (mReviewStatus == 1) {
                tvExamineStatus.setText("审查意见已发送");
                tvSendExamine.setText("重新审查");

            } else if (mReviewStatus == 3) {
                String sendTitle;
                String sendButtonStr = "发送债权人";
                if (isReplenishOrReviewPage) {
                    sendTitle = "补充审查意见未发送";
                } else {
                    sendTitle = "审查意见未发送";
                }
                tvExamineStatus.setText(sendTitle);
                tvSendExamine.setText(sendButtonStr);
            }else{
                tvExamineStatus.setVisibility(View.GONE);
                tvSendExamine.setVisibility(View.GONE);
                lyOption.setVisibility(View.VISIBLE);

            }
        } else {
            lyNoTaxDeclare.setVisibility(View.GONE);
            tvExamineStatus.setVisibility(View.GONE);
            tvSendExamine.setVisibility(View.GONE);
            lyOption.setVisibility(View.VISIBLE);
        }
    }

    @Override
    public void initData() {
        getDetailInfo();
    }


    @OnClick(R.id.tv_send_examine)
    public void onViewClicked() {
        if (showflag) {//重新审查
            jumpEditInfoPage(isReplenishOrReviewPage,false,true,false);
        } else if (mReviewStatus == 3) {//发送债权人
            sendReviewNotice();
        }
    }

    @OnClick(R.id.btn_objection)
    public void onObjectionClicked() {//异议
        DissentAddActivity.start(getActivity(), mCreditorId, mProjectId, mReviewId, 1);
    }

    private void showDetailInfo( ZQBaseProjectCrDecInfo data, ProCrDecReviewInfo crDecRev, ZQUserDetailBaseInfo creditorInfo ) {
        if (data == null || crDecRev == null || creditorInfo == null) return;
        //债权人名称
        if (!"".equalsIgnoreCase(creditorInfo.getLegalRepresentativeName())) {
            tvEditCreditorName.setText(creditorInfo.getLegalRepresentativeName());
        }
        if (!"".equalsIgnoreCase(creditorInfo.getCreditorName())) {
            tvEditCreditorName.setText(creditorInfo.getCreditorName());
        }
        if (!"".equalsIgnoreCase(creditorInfo.getAgentName())) {
            tvEditCreditorName.setText(creditorInfo.getAgentName());
        }
        //申报金额
        if (isTaxMode) {
            tvEditNormalTax.setText(formatAmount(
                    data.getDeclareAmountRegularTax()));
            tvEditOverdueFine.setText(formatAmount(data.getDeclareAmountOverdueFine()));
        } else {
            tvEditPrincipal.setText(formatAmount(data.getDeclareAmountPrincipal()));
            tvEditInterest.setText(formatAmount(data.getDeclareAmountInterest()));
        }
        tvEditOther.setText(formatAmount(data.getDeclareAmountOther()));
        tvEditTotalAmount.setText(formatAmount(data.getDeclareAmountTotal()));
        tvEditInstructions.setText("");

        if (!isTaxMode) {
            //优先债权主张和说明
            tvEditPriorityObligeeAmount.setText(formatAmount(data.getGuaranteePriority()));
            tvEditOtherObligeeAmount.setText(formatAmount(data.getOtherPriority()));
            tvEditObligeeInstructions.setText("");
        }else{
            tvEditPriorityObligeeAmount.setText("");
            tvEditOtherObligeeAmount.setText("");
            tvEditObligeeInstructions.setText("");
        }
        //审查结果
        tvEditConfirmAmount.setText(formatAmount(crDecRev.getConfirmedMoney()));
        if (isTaxMode) {
            tvEditResultNormalTax.setText(formatAmount(crDecRev.getRegularTaxMoney()));
            tvEditResultOverdueFine.setText(formatAmount(crDecRev.getOverdueFineMoney()));
            tvEditResultOther.setText(formatAmount(crDecRev.getOtherMoney()));
        } else {
            tvEditNormalAmount.setText(formatAmount(crDecRev.getOrdinaryMoney()));
            tvEditCreditorAmount.setText(formatAmount(crDecRev.getGuaranteePriority()));
            tvEditOtherCreditorAmount.setText(formatAmount(crDecRev.getOtherPriorityMoney()));
        }
        tvEditNoGivenAmount.setText(formatAmount(crDecRev.getDisconfirmationMoney()));
        tvEditPendingAmount.setText(formatAmount(crDecRev.getUndeterminedMoney()));
        //审查结果说明
        tvEditReviewResult.setText(crDecRev.getReviewResults());
        //需补充材料
        tvEditSupplementInfo.setText(crDecRev.getSupplementaryMaterial());
        //特别提示
        tvEditTipInfo.setText(crDecRev.getSpecialNote());

        if (!isManageType) {
            tvCreditorTip.setText(crDecRev.getSpecialNote());
            tvCreditorTip.setVisibility(View.VISIBLE);
            tvEditTipInfo.setVisibility(View.GONE);
            tvTitle6.setVisibility(View.GONE);
            tvNotictv.setVisibility(View.GONE);
            viewLine6.setVisibility(View.GONE);
            viewLine5.setVisibility(View.GONE);
//            tvTitle6
//            findViewById(R.id.tv_notictv).setVisibility(View.INVISIBLE);
        }else{
            tvTitle6.setVisibility(View.VISIBLE);
            tvNotictv.setVisibility(View.VISIBLE);
            viewLine6.setVisibility(View.VISIBLE);
            viewLine5.setVisibility(View.VISIBLE);
//            findViewById(R.id.tv_notictv).setVisibility(View.VISIBLE);
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        getDetailInfo();
    }




    private String formatAmount( String amount ) {
//        if (TextUtils.isEmpty(amount)) {
//            amount = "0.00";
//        }
        return String.format("%s元", CommonUtils.resetMoney(amount));
    }

    private void getDetailInfo() {
        if (TextUtils.isEmpty(getUserToken()) || TextUtils.isEmpty(mProjectId)) return;

        Observable<JsonObject> observable;
        if (isManageType) {

            if(!"".equalsIgnoreCase(mCreditorRightsId))
            {
                mReviewId = "";
            }
//            if ("".equalsIgnoreCase(mReviewId)) {
                observable = Network
                        .getAPIService()
                        // TODO 参数待完善
                        .getExamineReviewDetail_g(getUserToken(), mProjectId, mReviewId,mCreditorRightsId);
//            } else {
//                observable = Network
//                        .getAPIService()
//                        // TODO 参数待完善
//                        .getExamineReviewDetail_g(getUserToken(), mProjectId, mReviewId);
//            }
        } else {
//            if("".equalsIgnoreCase(mCreditorRightsId))
//            {
//                observable = Network
//                        .getAPIService()
//                        // TODO 参数待完善
//                        .getExamineReviewDetail_z2(getUserToken(), mProjectId, mReviewId);
//
//
//            }else {
                observable = Network
                        .getAPIService()
                        // TODO 参数待完善
                        .getExamineReviewDetail_z1(getUserToken(), mProjectId, "", mCreditorRightsId);
//            }
        }

        observable
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new BaseSubscriber<JsonObject>() {
                    @Override
                    public void onNext( JsonObject json ) {
                        int code = json.get("code").getAsInt();
                        if (code != 0) {
                            showToast(json.get("msg").getAsString());
                            return;
                        } else {
                            LogUtil.v("--->Tag", json.toString());

                            JsonObject data = json.getAsJsonObject("data");

                            mReEditData = new Gson().toJson(data);

                            //债权申报信息
                            projectCrDec = new Gson().fromJson(data.get("projectCrDec"), ZQBaseProjectCrDecInfo.class);

                            //审查信息
                            ProCrDecReviewInfo crDecRev = new Gson().fromJson(data.get("crDecRev"), ProCrDecReviewInfo.class);

                            //基本信息
                            ZQUserDetailBaseInfo creditorInfo = new Gson().fromJson(data.get("creditorInfo"), ZQUserDetailBaseInfo.class);

                            Boolean decHistory = true;
                            try {
                                decHistory = data.get("decHistory").getAsBoolean();
                            }catch (Exception ex)
                            {
                                ex.printStackTrace();
                            }

                            lyOption.removeAllViews();

                            if (!isManageType) {
                                ZQBaseTagInfo tagButton = new Gson().fromJson(data.get("tagButton"), ZQBaseTagInfo.class);
                                if (tagButton != null) {
                                    addOptionButton(tagButton);
                                }
                            }
                            if (isManageType) {
                                tvExamineStatus.setVisibility(View.VISIBLE);
                                tvSendExamine.setVisibility(View.VISIBLE);
                                if ("1".equalsIgnoreCase(projectCrDec.getReviewStatus().getValue())) {
                                    tvExamineStatus.setText("审查意见已发送");
                                    ( (CreditorReviewDetailActivity)getActivity()).setShowMenu(true);
                                    if(projectCrDec.getReviewStatus()!=null &&decHistory !=null)
//                                    if("1".equalsIgnoreCase(projectCrDec.getDeclareStatus().getValue()) && "1".equalsIgnoreCase(projectCrDec.getStatus().getValue()) )
                                    {
                                        if("1".equalsIgnoreCase(projectCrDec.getReviewStatus().getValue()) && !decHistory)
                                        {
                                            tvSendExamine.setVisibility(View.VISIBLE);
                                        }else {
                                            tvSendExamine.setVisibility(View.GONE);
                                        }
                                    }else{
                                        tvSendExamine.setVisibility(View.VISIBLE);
                                    }
                                    tvSendExamine.setText("重新审查");
                                    showflag = true;
                                } else  {
                                    String sendTitle;
                                    String sendButtonStr = "发送债权人";
                                    showflag = false;
                                    if (isReplenishOrReviewPage) {
                                        sendTitle = "补充审查意见未发送";
                                    } else {
                                        sendTitle = "审查意见未发送";
                                    }
                                    ( (CreditorReviewDetailActivity)getActivity()).setShowMenu(false);
                                    tvExamineStatus.setText(sendTitle);
                                    tvSendExamine.setText(sendButtonStr);
                                }

                            } else {
                                tvExamineStatus.setVisibility(View.GONE);
                                tvSendExamine.setVisibility(View.GONE);
                                lyOption.setVisibility(View.VISIBLE);

                            }


                            mCreditorId = creditorInfo.getId();
                            mReviewId = projectCrDec.getReview().getId();
                            mCreditorRightsId =crDecRev.getCreditorRightsId();
                            showDetailInfo(projectCrDec, crDecRev, creditorInfo);
                        }
                    }

                    @Override
                    public void onCompleted() {
                        super.onCompleted();
                    }

                    @Override
                    public void onError( Throwable e ) {
                        super.onError(e);
                    }
                });
    }

    private void sendReviewNotice() {
        if (TextUtils.isEmpty(getUserToken()) || TextUtils.isEmpty(mProjectId) || TextUtils.isEmpty(mReviewId)) return;
        Network.getAPIService().sendExamineReviewNotice(getUserToken(), mProjectId, mReviewId)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new BaseSubscriber<JsonObject>() {
                    @Override
                    public void onNext( JsonObject json ) {
                        int code = json.get("code").getAsInt();
                        if (code != 0) {
                            showToast(json.get("msg").getAsString());
                            return;
                        }
                        LogUtil.d("tag1", json.toString());
                        showShort("提交成功");
                        EventBus.getDefault().post("sendDataStatus");

                        onSendSuccess();
                    }

                    @Override
                    public void onCompleted() {
                        super.onCompleted();
                    }

                    @Override
                    public void onError( Throwable e ) {
                        super.onError(e);
                        showToast("提交失败");
                    }

                });
    }

    private void onSendSuccess() {
        if (getActivity() != null) {
            getActivity().onBackPressed();
        } else {
            ( (FragmentActivity) Objects.requireNonNull(getContext()) ).onBackPressed();
        }
    }

    private String reFormatAmount( String oldData ) {
        return TextUtils.isEmpty(oldData) ? "0.00" : oldData.replace("元", "");
    }

    private void addOptionButton( ZQBaseTagInfo info ) {
        if (info == null || ( TextUtils.isEmpty(info.getFill_review()) && TextUtils.isEmpty(info.getContinue_fill_review()) && TextUtils.isEmpty(info.getLook_review()) &&
                TextUtils.isEmpty(info.getLook_review_pre()) && TextUtils.isEmpty(info.getReplenish_review()) && TextUtils.isEmpty(info.getContinue_fill_replenish_review())
                && TextUtils.isEmpty(info.getLook_replenish_review()) && TextUtils.isEmpty(info.getReplenish_dec()) && TextUtils.isEmpty(info.getDissent_review()) )) {
            return;
        }

        lyOption.setOrientation(LinearLayout.HORIZONTAL);

        List<String> strings = new ArrayList<>();
        if (!TextUtils.isEmpty(info.getDissent_review())) {
            strings.add(info.getDissent_review());
        }
        if (!TextUtils.isEmpty(info.getFill_review())) {
            strings.add(info.getFill_review());
        }
        if (!TextUtils.isEmpty(info.getFill_review())) {
            strings.add(info.getFill_review());
        }
        if (!TextUtils.isEmpty(info.getLook_review())) {
            strings.add(info.getLook_review());
        }
        if (!TextUtils.isEmpty(info.getLook_review_pre())) {
            strings.add(info.getLook_review_pre());
        }

        if (!TextUtils.isEmpty(info.getContinue_fill_replenish_review())) {
            strings.add(info.getContinue_fill_replenish_review());
        }
        if (!TextUtils.isEmpty(info.getLook_replenish_review())) {
            strings.add(info.getLook_replenish_review());
        }
        if (!TextUtils.isEmpty(info.getReplenish_dec())) {
            strings.add(info.getReplenish_dec());
        }

        if (!TextUtils.isEmpty(info.getReplenish_review())) {
            strings.add(info.getReplenish_review());
        }

        if(mShowBt) {
            lyOption.removeAllViews();
            for (int i = 0; i < strings.size(); i++) {
                String title = strings.get(i);

                final TextView textView = new TextView(mActivity);
                textView.setId(i);
                textView.setGravity(Gravity.CENTER);
                int marginRight = ScreenUtils.dip2px(mActivity, 4);
                textView.setText(title);
                textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);

                textView.setMaxLines(1);
                textView.setTextColor(ContextCompat.getColor(mActivity, R.color.white));
                if("补充申报".equalsIgnoreCase(title))
                {
                    textView.setBackground(ContextCompat.getDrawable(mActivity, R.drawable.bg_btn_common_orange));
                }else {
                    textView.setBackground(ContextCompat.getDrawable(mActivity, R.drawable.bg_btn_common));
                }
                int paddingTopAndBottom = ScreenUtils.dip2px(mActivity, 8);
                textView.setPadding(0, paddingTopAndBottom, 0, paddingTopAndBottom);
                LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1.0f);
                params.rightMargin = marginRight;
                textView.setLayoutParams(params);

                textView.setOnClickListener(view -> {
                    //todo 对应按钮的事件
                    String curStr = textView.getText().toString().trim();
                    if ("补充申报".equals(curStr)) {
//                    jumpEditInfoPage(true,false);
                        String strTax = "1";
                        if (isTaxMode) {
                            strTax = "2";
                        }
                        CreateZQBCApplyActivity.start(getActivity(), projectCrDec.getCreditorId(), mProjectId, strTax, 1, projectCrDec);
                    } else if ("异议".equals(curStr)) {
                        int type = 1;
                        if (isManageType) {
                            type = 0;
                        }
                        DissentAddActivity.start(getActivity(), mCreditorId, mProjectId, mReviewId, type);

                    }
                });
                lyOption.addView(textView);
            }
        }
    }

    public void jumpEditInfoPage( boolean isReplenishOrReviewPage ,Boolean flag,Boolean showReviewId,Boolean f_edit) {
        Intent intent = new Intent(getContext(), EditCreditorReviewInfoActivity.class);
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_IS_MANAGE_TYPE, isManageType);
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_IS_FIRST_EDIT, flag);//true:初次填写  false:重新填写
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_IS_TAX_MODE, isTaxMode);//true：税务，false： //非税务
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_IS_REPLENISH_REVIEW, isReplenishOrReviewPage);//true:补充 或 重新审查 类型
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_ID_PROJECT, mProjectId);
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_ID_CREDITOR_RIGHTS, mCreditorRightsId);
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_ID_EDIT, f_edit);
        String reviewId = mReviewId;
//        if(!isReplenishOrReviewPage) {
//            if (mReviewStatus != 3) {
//                reviewId = "";
//            }
//        }
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_ID_REVIEW, reviewId);
        intent.putExtra(EditCreditorReviewInfoActivity.INTENT_REEDIT_DATA, mReEditData);//重新审查填写数据
        startActivity(intent);
    }
}
